package com.rmb.api.service.impl;

import com.rmb.api.dao.DetailsDao;
import com.rmb.api.entity.Details;
import com.rmb.api.service.DetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @author zhao
 */
@Service
public class DetailsServiceImpl implements DetailsService {

    @Autowired(required = false)
    private DetailsDao detailsDao;


    /**
     *查询所有数据
     * @return
     * **/
    @Override
    public List<Map<String, Object>> findList() {
        //Date date = new Date();
        return detailsDao.findList();
    }

    /**
     *条件查询
     * @return
     ***/
    @Override
    public Details selectBy(String ipAddr, String requestMethod, String introductory) {
         Map<String, String> map = new HashMap<>(2000);
        map.put("ipAddr",ipAddr);
        map.put("requestMethod",requestMethod);
        map.put("introductory",introductory);
        return detailsDao.selectBy(map);
    }
}
